import { Component, Input } from '@angular/core';
import { TableWidthConfig } from '@devui';

@Component({
  selector: 'app-lrp-result',
  templateUrl: './lrp-result.component.html',
  styleUrls: ['./lrp-result.component.scss']
})
export class LrpResultComponent {
   @Input() data: any;
    options2 = ['策略1', '策略2', '策略3', '策略4', '策略5', ];
    values2 = ['策略1', '策略2'];
    options = ['策略1', '策略2', '策略3', '策略4' ];
    values = ['策略1', '策略2'];
    tableheight = '400px';

    dataTableOptions2 = {
        columns: [
          {
            field: 'code',
            header: '生产计划单号',
            fieldType: 'text',
          },
          {
            field: 'code',
            header: '物料编码',
            fieldType: 'text',
          },
          {
            field: 'code',
            header: '图片',
            fieldType: 'text',
          },
          {
            field: 'code',
            header: '物料名称',
            fieldType: 'text',
          },
          {
            field: 'code',
            header: '物料规格',
            fieldType: 'text',
          },
          {
            field: 'code',
            header: '物料描述',
            fieldType: 'text',
          },
          {
            field: 'name',
            header: '物料单位',
            fieldType: 'text',
          },
          {
            field: 'workCode',
            header: '数量',
            fieldType: 'text',
          },
          {
            field: 'workCode',
            header: '来源单号',
            fieldType: 'text',
          },
          {
            field: 'workCode',
            header: '备注',
            fieldType: 'text',
          },
        ],
      }; //表头数据
      tableWidthConfig2: TableWidthConfig[] = [
        {
          field: '物料编码',
          width: '150px',
        },
        {
          field: '物料编码',
          width: '150px',
        },
        {
          field: '图片',
          width: '150px',
        },
        {
          field: '物料名称',
          width: '150px',
        },
        {
          field: '物料规格',
          width: '150px',
        },

        {
          field: '物料描述',
          width: '150px',
        },
        {
          field: '物料单位',
          width: '150px',
        },
        {
          field: '数量',
          width: '150px',
        },
        {
          field: '来源单号',
          width: '150px',
        },
        {
          field: '备注',
          width: '150px',
        },
      ]; //表格宽度配置
      dataTableOptions = {
        columns: [
          {
            field: '采购计划单号',
            header: '采购计划单号',
            fieldType: 'text',
          },
          {
            field: 'code',
            header: '物料编码',
            fieldType: 'text',
          },
          {
            field: 'code',
            header: '图片',
            fieldType: 'text',
          },
          {
            field: 'code',
            header: '物料名称',
            fieldType: 'text',
          },
          {
            field: 'code',
            header: '物料规格',
            fieldType: 'text',
          },
          {
            field: 'code',
            header: '物料描述',
            fieldType: 'text',
          },
          {
            field: 'name',
            header: '物料单位',
            fieldType: 'text',
          },
          {
            field: 'workCode',
            header: '采购数量',
            fieldType: 'text',
          },
          {
            field: 'workCode',
            header: '来源单号',
            fieldType: 'text',
          },
          {
            field: 'workCode',
            header: '备注',
            fieldType: 'text',
          },
        ],
      }; //表头数据
      tableWidthConfig: TableWidthConfig[] = [

        {
          field: '物料编码',
          width: '150px',
        },
        {
          field: '物料编码',
          width: '150px',
        },
        {
          field: '图片',
          width: '150px',
        },
        {
          field: '物料名称',
          width: '150px',
        },
        {
          field: '物料规格',
          width: '150px',
        },

        {
          field: '物料描述',
          width: '150px',
        },
        {
          field: '物料单位',
          width: '150px',
        },
        {
          field: '数量',
          width: '150px',
        },
        {
          field: '来源单号',
          width: '150px',
        },
        {
          field: '备注',
          width: '150px',
        },
      ]; //表格宽度配置
    partDetail = [{
      "id": 19,
      "partNum": "PN019",
      "partId": 119,
      "image": "",
      "partUOM": "pcs",
      "partName": "Part 19",
      "description": "Description 19",
      "partType": "Type S",
      "note": "Note 19",
      "quantity": 190,
      "sourceOrderNum": "SO019",
      "sourceOrderPartId": 219,
      "sourceOrderType": "销售订单"
    },
    {
      "id": 20,
      "partNum": "PN020",
      "partId": 120,
      "image": "",
      "partUOM": "pcs",
      "partName": "Part 20",
      "description": "Description 20",
      "partType": "Type T",
      "note": "Note 20",
      "quantity": 200,
      "sourceOrderNum": "SO020",
      "sourceOrderPartId": 220,
      "sourceOrderType": "采购订单"
    }];
    partDetail2 = [{
      "id": 19,
      "partNum": "PN019",
      "partId": 119,
      "image": "",
      "partUOM": "pcs",
      "partName": "Part 19",
      "description": "Description 19",
      "partType": "Type S",
      "note": "Note 19",
      "quantity": 190,
      "sourceOrderNum": "SO019",
      "sourceOrderPartId": 219,
      "sourceOrderType": "LRP-000001"
    },
    {
      "id": 20,
      "partNum": "PN020",
      "partId": 120,
      "image": "",
      "partUOM": "pcs",
      "partName": "Part 20",
      "description": "Description 20",
      "partType": "Type T",
      "note": "Note 20",
      "quantity": 200,
      "sourceOrderNum": "SO020",
      "sourceOrderPartId": 220,
      "sourceOrderType": "LRP-000001"
    }];
}
